<%--
  Created by IntelliJ IDEA.
  User: cuichanghe
  Date: 2021/9/26
  Time: 7:41 下午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<script src="${pageContext.request.contextPath}/js/jquery-3.5.1.min.js"></script>
<html>
<head>
    <title>Welcome To CURD For SSM</title>
</head>
<body>
<h1>Hello World!</h1>
<a href="/SSM_Web_exploded/findAll">
    <input type="button" value="查询所有结果">
</a>
<form  id="findViaId" name="findViaId" method="get" action="/SSM_Web_exploded/findViaId">
    <p>请输入id:<input type="text" name="userId" id="userId"></p>
    <input type="submit" id="submit">
</form>
</body>
<%--<script>--%>
<%--    $("submit").click(function () {--%>
<%--        $.ajax({--%>
<%--            url: "/SSM_Web_exploded/findViaId"+text.data,--%>
<%--            type: "get",--%>
<%--            async: "false",--%>
<%--            dataType: "JSON",--%>
<%--            data: $("#findViaId").serialize(),--%>
<%--            success: function (data) {--%>
<%--                if(data == 0){--%>
<%--                    alert("发送成功")--%>
<%--                }else if(data == 1){--%>
<%--                    alert("添加失败")--%>
<%--                }--%>
<%--            }--%>
<%--        });--%>
<%--    });--%>
<%--</script>--%>
</html>
